package com.sz.mes.vo;

import com.diboot.core.binding.annotation.*;
import com.sz.mes.entity.WorksheetRelation;
import com.sz.mes.entity.Worksheet;
import com.sz.mes.entity.Goods;
import com.sz.mes.entity.Equipment;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.List;

/**
 * 加工单关联表 ListVO定义
 * @author hem
 * @version 1.0
 * @date 2023-05-25
 * Copyright © szhs
 */
@Getter
@Setter
@Accessors(chain = true)
public class WorksheetRelationListVO extends WorksheetRelation {

    private static final long serialVersionUID = -3218535510405185337L;

    /**
     * 关联字段 商品表.商品名称：Goods.goodsName
     */
    @BindField(entity = Goods.class, field = "goodsName", condition = "this.goods_id=id")
    private String goodsGoodsName;

    /**
     * 关联字段 设备.设备名称：Equipment.equipmentName
     */
    @BindField(entity = Equipment.class, field = "equipmentName", condition = "this.equipment_id=id")
    private String equipmentEquipmentName;

    /**
     * 关联字典：PROCESS_STATUS
     */
    @BindDict(type = DICT_PROCESS_STATUS, field = "state")
    private String stateLabel;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.user_id=id")
    private String iamUserRealname;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;

    /**
     * 关联字段 系统用户.真实姓名：IamUser.realname
     */
    @BindField(entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;
}
